<html>
<head><meta charset="utf-8"><title>aarch64-apple-darwin isn&#x27;t true support · t-compiler/arm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/index.html">t-compiler/arm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html">aarch64-apple-darwin isn&#x27;t true support</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="202943302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943302">(Jul 05 2020 at 23:45)</a>:</h4>
<p>Please do not market a generic "aarch64-apple-darwin" target as true support, as it is extremely likely that Apple DTKs are running on an ARM64E (ARMv8.3/4) platform.</p>



<a name="202943433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943433">(Jul 05 2020 at 23:48)</a>:</h4>
<p>This sounds like a semantics argument that isn't likely to improve anything, so I'd encourage you to reframe your point to be actionable and constructive.</p>



<a name="202943444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943444">(Jul 05 2020 at 23:49)</a>:</h4>
<p>When you compile to <code>x86_64-apple-darwin</code>, we target a core2 processor by default. I assume that the same will happen here — <code>aarch64-apple-darwin</code> will target the intersection of whatever processor ships in the first commercial machine and what LLVM supports.</p>



<a name="202943493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943493">(Jul 05 2020 at 23:50)</a>:</h4>
<p>That's the problem, upstream, and by extension rust LLVM <strong><em>does not support PAC or ARMv8.3</em></strong></p>



<a name="202943497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943497">(Jul 05 2020 at 23:50)</a>:</h4>
<p>and god knows whenever it'll be upstreamed.</p>



<a name="202943503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943503">(Jul 05 2020 at 23:51)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="312033">@aspen</span>'s point is that newer machines will refuse to run old code</p>



<a name="202943506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943506">(Jul 05 2020 at 23:51)</a>:</h4>
<p>^^^^</p>



<a name="202943508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943508">(Jul 05 2020 at 23:51)</a>:</h4>
<p>I've ran into this problem while using Rust to make iOS tweaks.</p>



<a name="202943511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943511">(Jul 05 2020 at 23:51)</a>:</h4>
<p>do we actually know that this will be the case on macOS or could it be mobile-only?</p>



<a name="202943549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943549">(Jul 05 2020 at 23:52)</a>:</h4>
<p>Judging from the fact that the DTK has an ARMv8.3 processor (A12Z bionic), it is very likely</p>



<a name="202943570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943570">(Jul 05 2020 at 23:53)</a>:</h4>
<p>For example, if Rust is ever used for libraries on ARM macOS</p>



<a name="202943572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943572">(Jul 05 2020 at 23:53)</a>:</h4>
<p>An arm64 object/library cannot be linked to an arm64e binary.</p>



<a name="202943576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943576">(Jul 05 2020 at 23:53)</a>:</h4>
<p>but surely the OS can <em>choose</em> whether it allows code that doesn't do pointer authentication or w/e, to run?</p>



<a name="202943577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943577">(Jul 05 2020 at 23:53)</a>:</h4>
<p>my understanding is that it's like code signing</p>



<a name="202943617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943617">(Jul 05 2020 at 23:54)</a>:</h4>
<p>For example, if I try to call a signed pointer from a arm64 library on iOS</p>



<a name="202943618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943618">(Jul 05 2020 at 23:54)</a>:</h4>
<p>similarly, iOS disallows any JITs other than the one in WebKit, but macOS doesn't have such a rule</p>



<a name="202943619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943619">(Jul 05 2020 at 23:54)</a>:</h4>
<p>It segfaults.</p>



<a name="202943622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943622">(Jul 05 2020 at 23:54)</a>:</h4>
<p>In additional, clang/lld will refuse to link an arm64 object with an arm64e object, and vice versa.</p>



<a name="202943627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943627">(Jul 05 2020 at 23:55)</a>:</h4>
<p>okay that's more interesting</p>



<a name="202943635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943635">(Jul 05 2020 at 23:55)</a>:</h4>
<p>do we know whether aarch64 macOS machines are going to use the <code>e</code> variant?</p>



<a name="202943674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943674">(Jul 05 2020 at 23:56)</a>:</h4>
<p>I mean, someone would probably need to run <code>file</code> on a Big Sur ARM system library to find out</p>



<a name="202943676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943676">(Jul 05 2020 at 23:56)</a>:</h4>
<p>AFAICT, <span class="user-mention" data-user-id="116155">@Jake Goulding</span> getting something to run suggests that's not the case</p>



<a name="202943678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943678">(Jul 05 2020 at 23:56)</a>:</h4>
<p>A lone binary can run.</p>



<a name="202943682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943682">(Jul 05 2020 at 23:56)</a>:</h4>
<p>The problem comes in when you want to interface with e-variant programs.</p>



<a name="202943685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202943685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202943685">(Jul 05 2020 at 23:56)</a>:</h4>
<p>Such as using a Rust library from something else.</p>



<a name="202944328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202944328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202944328">(Jul 06 2020 at 00:16)</a>:</h4>
<div class="codehilite"><pre><span></span><code>% find Safari.app -perm +111 -type f -print0 | xargs -0 file
Safari.app/Contents/MacOS/Safari:                                                                                                             Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/MacOS/Safari (for architecture x86_64): Mach-O 64-bit executable x86_64
Safari.app/Contents/MacOS/Safari (for architecture arm64e): Mach-O 64-bit executable arm64e
Safari.app/Contents/PlugIns/CacheDeleteExtension.appex/Contents/MacOS/CacheDeleteExtension:                                                   Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/PlugIns/CacheDeleteExtension.appex/Contents/MacOS/CacheDeleteExtension (for architecture x86_64):   Mach-O 64-bit executable x86_64
Safari.app/Contents/PlugIns/CacheDeleteExtension.appex/Contents/MacOS/CacheDeleteExtension (for architecture arm64e):   Mach-O 64-bit executable arm64e
Safari.app/Contents/PlugIns/SafariQuickLookPreview.appex/Contents/MacOS/SafariQuickLookPreview:                                               Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/PlugIns/SafariQuickLookPreview.appex/Contents/MacOS/SafariQuickLookPreview (for architecture x86_64):   Mach-O 64-bit executable x86_64
Safari.app/Contents/PlugIns/SafariQuickLookPreview.appex/Contents/MacOS/SafariQuickLookPreview (for architecture arm64e):   Mach-O 64-bit executable arm64e
Safari.app/Contents/PlugIns/DiagnosticExtension.appex/Contents/MacOS/DiagnosticExtension:                                                     Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/PlugIns/DiagnosticExtension.appex/Contents/MacOS/DiagnosticExtension (for architecture x86_64): Mach-O 64-bit executable x86_64
Safari.app/Contents/PlugIns/DiagnosticExtension.appex/Contents/MacOS/DiagnosticExtension (for architecture arm64e): Mach-O 64-bit executable arm64e
Safari.app/Contents/PlugIns/Safari.wkbundle/Contents/MacOS/Safari:                                                                            Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64e:Mach-O 64-bit bundle arm64e]
Safari.app/Contents/PlugIns/Safari.wkbundle/Contents/MacOS/Safari (for architecture x86_64):    Mach-O 64-bit bundle x86_64
Safari.app/Contents/PlugIns/Safari.wkbundle/Contents/MacOS/Safari (for architecture arm64e):    Mach-O 64-bit bundle arm64e
Safari.app/Contents/Resources/appdiagnose:                                                                                                    Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/Resources/appdiagnose (for architecture x86_64):    Mach-O 64-bit executable x86_64
Safari.app/Contents/Resources/appdiagnose (for architecture arm64e):    Mach-O 64-bit executable arm64e
Safari.app/Contents/XPCServices/com.apple.Safari.SandboxBroker.xpc/Contents/MacOS/com.apple.Safari.SandboxBroker:                             Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/XPCServices/com.apple.Safari.SandboxBroker.xpc/Contents/MacOS/com.apple.Safari.SandboxBroker (for architecture x86_64): Mach-O 64-bit executable x86_64
Safari.app/Contents/XPCServices/com.apple.Safari.SandboxBroker.xpc/Contents/MacOS/com.apple.Safari.SandboxBroker (for architecture arm64e): Mach-O 64-bit executable arm64e
Safari.app/Contents/XPCServices/com.apple.WebKit.WebContent.Safari.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Safari:                     Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/XPCServices/com.apple.WebKit.WebContent.Safari.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Safari (for architecture x86_64): Mach-O 64-bit executable x86_64
Safari.app/Contents/XPCServices/com.apple.WebKit.WebContent.Safari.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Safari (for architecture arm64e): Mach-O 64-bit executable arm64e
Safari.app/Contents/XPCServices/com.apple.Safari.BrowserDataImportingService.xpc/Contents/MacOS/com.apple.Safari.BrowserDataImportingService: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
Safari.app/Contents/XPCServices/com.apple.Safari.BrowserDataImportingService.xpc/Contents/MacOS/com.apple.Safari.BrowserDataImportingService (for architecture x86_64): Mach-O 64-bit executable x86_64
Safari.app/Contents/XPCServices/com.apple.Safari.BrowserDataImportingService.xpc/Contents/MacOS/com.apple.Safari.BrowserDataImportingService (for architecture arm64e): Mach-O 64-bit executable arm64e
</code></pre></div>



<a name="202944361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202944361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202944361">(Jul 06 2020 at 00:17)</a>:</h4>
<p>Yup, that's ARM64E.</p>



<a name="202944967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202944967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202944967">(Jul 06 2020 at 00:36)</a>:</h4>
<div class="codehilite"><pre><span></span><code>% file /Applications/Xcode-beta.app/Contents/Developer/usr/bin/lldb
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/lldb: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/lldb (for architecture x86_64): Mach-O 64-bit executable x86_64
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/lldb (for architecture arm64):  Mach-O 64-bit executable arm64
</code></pre></div>



<a name="202944982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202944982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202944982">(Jul 06 2020 at 00:37)</a>:</h4>
<p>System binaries are arm64e, but xcode is arm64? Strange.</p>
<p>I bet that LLDB will segfault if you try to attach to an arm64e process, like safari.</p>



<a name="202945104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945104">(Jul 06 2020 at 00:41)</a>:</h4>
<p>this feels like it's like "signed apps"</p>



<a name="202945107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945107">(Jul 06 2020 at 00:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> what about frameworks?</p>



<a name="202945117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945117">(Jul 06 2020 at 00:41)</a>:</h4>
<p>arm64e = apple's ABI + ARMv8.3 + PAC</p>



<a name="202945159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945159">(Jul 06 2020 at 00:42)</a>:</h4>
<p>if both Safari and <code>lldb</code> work, wouldn't that mean both arm64 and arm64e versions of system frameworks exist?</p>



<a name="202945168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Notification Bot <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945168">(Jul 06 2020 at 00:43)</a>:</h4>
<p>This topic was moved here from <a class="stream-topic" data-stream-id="242791" href="/#narrow/stream/242791-t-infra/topic/aarch64-apple-darwin.20isn.27t.20true.20support">#t-infra &gt; aarch64-apple-darwin isn't true support</a> by <span class="user-mention silent" data-user-id="116122">simulacrum</span></p>



<a name="202945171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945171">(Jul 06 2020 at 00:43)</a>:</h4>
<p>Thanks!</p>



<a name="202945412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945412">(Jul 06 2020 at 00:50)</a>:</h4>
<p>Looks like everything in <code>/System/Library/Frameworks</code> is <code>arm64e</code> (or <code>x86_64</code> or <code>x86_64h</code>)</p>



<a name="202945416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945416">(Jul 06 2020 at 00:50)</a>:</h4>
<p>x86_64h is catalyst</p>



<a name="202945463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945463">(Jul 06 2020 at 00:52)</a>:</h4>
<p>so if the executable is <code>arm64</code>, the protection features are turned off?</p>



<a name="202945466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945466">(Jul 06 2020 at 00:52)</a>:</h4>
<p>and <code>arm64e</code> code can interop with <code>arm64</code> code without crashing</p>



<a name="202945467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945467">(Jul 06 2020 at 00:52)</a>:</h4>
<p>more like "it's not even aware of the protection features"</p>



<a name="202945486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945486">(Jul 06 2020 at 00:53)</a>:</h4>
<p>I mean the CPU isn't checking stuff. because if it was and it worked, I don't see why an <code>arm64e</code> executable would have trouble running <code>arm64</code> code</p>



<a name="202945532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945532">(Jul 06 2020 at 00:54)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/aarch64-apple-darwin.20isn't.20true.20support/near/202945466">said</a>:</p>
<blockquote>
<p>and <code>arm64e</code> code can interop with <code>arm64</code> code without crashing</p>
</blockquote>
<p>not at first glance:</p>
<div class="codehilite"><pre><span></span><code>% file target/debug/libmath.dylib
target/debug/libmath.dylib: Mach-O 64-bit dynamically linked shared library arm64

% cc -arch arm64e host.c -L target/debug/ -lmath -o host

% ./host
zsh: killed     ./host
</code></pre></div>



<a name="202945546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945546">(Jul 06 2020 at 00:55)</a>:</h4>
<p>Check my code for dumb mistakes though:</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#[no_mangle]</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">extern</span><span class="w"> </span><span class="s">&quot;C&quot;</span><span class="w"> </span><span class="k">fn</span> <span class="nf">math_add</span><span class="p">(</span><span class="n">a</span>: <span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kt">u8</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">u8</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">a</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">b</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;inttypes.h&gt;</span><span class="cp"></span>

<span class="kt">uint8_t</span> <span class="nf">math_add</span><span class="p">(</span><span class="kt">uint8_t</span><span class="p">,</span> <span class="kt">uint8_t</span><span class="p">);</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="n">printf</span><span class="p">(</span><span class="s">&quot;-&gt; %&quot;</span> <span class="n">PRIu8</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">math_add</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">));</span>
<span class="p">}</span>
</code></pre></div>



<a name="202945590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945590">(Jul 06 2020 at 00:56)</a>:</h4>
<p>can you get a segfault type</p>



<a name="202945596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945596">(Jul 06 2020 at 00:57)</a>:</h4>
<p>i mean is it segfaulting?</p>



<a name="202945597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945597">(Jul 06 2020 at 00:57)</a>:</h4>
<p>attach a debugger</p>



<a name="202945641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945641">(Jul 06 2020 at 00:58)</a>:</h4>
<p>it should be something like "EXEC_BAD_ACCESS (SIGSEGV)"/"KERN_INVALID_ADDRESS"</p>



<a name="202945701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945701">(Jul 06 2020 at 01:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> I meant specifically in the context of <code>arm64</code> binary using <code>arm64e</code> library</p>



<a name="202945703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945703">(Jul 06 2020 at 01:00)</a>:</h4>
<p>i.e. where the process <em>doesn't</em> start in <code>e</code> mode</p>



<a name="202945711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945711">(Jul 06 2020 at 01:00)</a>:</h4>
<p>I suspect you can call back and forth between <code>arm64e</code> and <code>arm64</code> code, but <em>only</em> in that situation</p>



<a name="202945722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945722">(Jul 06 2020 at 01:01)</a>:</h4>
<p>also I wonder why <code>zsh</code> doesn't say how the process died, <code>fish</code> does (but on Linux, idk if that makes a difference)</p>



<a name="202945768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945768">(Jul 06 2020 at 01:02)</a>:</h4>
<p>I will note, it's possible to call arm64e from arm64 if you run ptrauth_strip on all function pointers</p>



<a name="202945771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945771">(Jul 06 2020 at 01:02)</a>:</h4>
<p>ptrauth_strip compiles down to some weird instruction IIRC</p>



<a name="202945792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945792">(Jul 06 2020 at 01:03)</a>:</h4>
<p>but Rust <code>arm64</code> executables will call into <code>libSystem</code> (which is presumably <code>arm64e</code>) without that, so presumably <code>ptrauth_strip</code> only makes a difference if the process started in <code>arm64e</code> mode?</p>



<a name="202945830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945830">(Jul 06 2020 at 01:04)</a>:</h4>
<p>Yes.</p>



<a name="202945833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945833">(Jul 06 2020 at 01:04)</a>:</h4>
<p>thanks, that makes sense</p>



<a name="202945837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945837">(Jul 06 2020 at 01:04)</a>:</h4>
<p>In theory it'd be possible to make rustc add this special instruction to everything? Idk</p>



<a name="202945838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945838">(Jul 06 2020 at 01:04)</a>:</h4>
<p><code>extern "arm64e" fn(...)</code> pointers? :P</p>



<a name="202945847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945847">(Jul 06 2020 at 01:05)</a>:</h4>
<p>(just kidding, if we did it, it'd have to be on all non-Rust <code>fn</code> pointers, presumably including all FFI)</p>



<a name="202945853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945853">(Jul 06 2020 at 01:05)</a>:</h4>
<p>yeah you'd just have to vomit it all over every external function pointer</p>



<a name="202945911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945911">(Jul 06 2020 at 01:07)</a>:</h4>
<div class="codehilite"><pre><span></span><code>(lldb) target create &quot;./host&quot;
Current executable set to &#39;mix-arm64-and-arm64e/host&#39; (arm64e).
(lldb) r
error: process exited with status -1 (no such process.)
</code></pre></div>


<p>That's it <span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span></p>



<a name="202945966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945966">(Jul 06 2020 at 01:09)</a>:</h4>
<p>that must be what <span class="user-mention" data-user-id="312033">@aspen</span> was saying earlier that you can't use that <code>lldb</code> to debug <code>arm64e</code> executables</p>



<a name="202945971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945971">(Jul 06 2020 at 01:09)</a>:</h4>
<p>I wonder of "no such process" is what the kernel is erroring with when <code>lldb</code> tries to attach, lol</p>



<a name="202945973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202945973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202945973">(Jul 06 2020 at 01:09)</a>:</h4>
<div class="codehilite"><pre><span></span><code>% cc -arch arm64e host.c target/debug/libmath.a -o host
ld: warning: ignoring file target/debug/libmath.a, building for macOS-arm64e but attempting to link with file built for unknown-arm64
Undefined symbols for architecture arm64e:
  &quot;_math_add&quot;, referenced from:
      _main in host-a593da.o
ld: symbol(s) not found for architecture arm64e
</code></pre></div>



<a name="202946025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946025">(Jul 06 2020 at 01:10)</a>:</h4>
<p>yuup there's your "can't cross-link" error</p>



<a name="202946027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946027">(Jul 06 2020 at 01:10)</a>:</h4>
<p>The good news is that we should be able to have a separate target for the two worlds. Especially since you can <code>lipo</code> them together anyway.</p>



<a name="202946029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946029">(Jul 06 2020 at 01:10)</a>:</h4>
<p>you can change the cpu subtype via hex editor to see the segfault</p>



<a name="202946030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946030">(Jul 06 2020 at 01:11)</a>:</h4>
<p>wait why did it work earlier?</p>



<a name="202946043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946043">(Jul 06 2020 at 01:11)</a>:</h4>
<p>with the dylib? I guess it doesn't eagerly check?</p>



<a name="202946051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946051">(Jul 06 2020 at 01:11)</a>:</h4>
<p>oooh, <code>cdylib</code> vs <code>staticlib</code></p>



<a name="202946097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946097">(Jul 06 2020 at 01:12)</a>:</h4>
<p>yeah</p>



<a name="202946109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946109">(Jul 06 2020 at 01:13)</a>:</h4>
<p>you shouldn't need <code>lipo</code>, if you can generate an <code>arm64e</code> library you should be able to link it into either <code>arm64</code> or <code>arm64e</code></p>



<a name="202946120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202946120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202946120">(Jul 06 2020 at 01:13)</a>:</h4>
<p>e.g. you can try an <code>arm64e</code> C library linked into an <code>arm64</code> Rust binary, in your example setup</p>



<a name="202965384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202965384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202965384">(Jul 06 2020 at 08:41)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> Just catching up on this. To answer your question about “Will macOS have a e variant?” Apple has said that they will eventually open things like PAC to user space code but initially it’s going to be restricted to Apple’s Apps.</p>



<a name="202966269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202966269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202966269">(Jul 06 2020 at 08:53)</a>:</h4>
<p>ah so we shouldn't even bother for now lol</p>



<a name="202985537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202985537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202985537">(Jul 06 2020 at 13:05)</a>:</h4>
<p><a href="https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication">https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication</a></p>
<blockquote>
<p>Important</p>
<p>App Store Connect and Testflight don’t yet accept submissions with an arm64e slice. Xcode removes this slice from your app bundle when you upload it.</p>
</blockquote>



<a name="202993718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/202993718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#202993718">(Jul 06 2020 at 14:04)</a>:</h4>
<p>(i have my own reasons for wanting arm64e support, unrelated to Apple Silicon macs)</p>



<a name="203025652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/203025652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#203025652">(Jul 06 2020 at 18:41)</a>:</h4>
<p><a href="https://twitter.com/jckarter/status/1280209930885017600">https://twitter.com/jckarter/status/1280209930885017600</a></p>
<div class="inline-preview-twitter"><div class="twitter-tweet"><a href="https://twitter.com/jckarter/status/1280209930885017600"><img class="twitter-avatar" src="https://pbs.twimg.com/profile_images/1251258044106723328/O5MSYSy-_normal.jpg"></a><p><a href="https://twitter.com/JakeGoulding">@JakeGoulding</a> <a href="https://twitter.com/luxx4x">@luxx4x</a> <a href="https://twitter.com/indirect">@indirect</a> I think it'd still be more frustrating than rewarding right now to try to chase arm64e support to interop with Apple C/Swift ABIs right now, since they're still in flux. It could be interesting to mess with to starting working out a good ptrauth ABI for rust though</p><span>- Joe Groff (@jckarter)</span></div></div>



<a name="203026283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin%20isn%27t%20true%20support/near/203026283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/aarch64-apple-darwin.20isn&#x27;t.20true.20support.html#203026283">(Jul 06 2020 at 18:47)</a>:</h4>
<p><a href="https://twitter.com/jckarter/status/1280211570182615040">https://twitter.com/jckarter/status/1280211570182615040</a></p>
<div class="inline-preview-twitter"><div class="twitter-tweet"><a href="https://twitter.com/jckarter/status/1280211570182615040"><img class="twitter-avatar" src="https://pbs.twimg.com/profile_images/1251258044106723328/O5MSYSy-_normal.jpg"></a><p><a href="https://twitter.com/JakeGoulding">@JakeGoulding</a> <a href="https://twitter.com/luxx4x">@luxx4x</a> <a href="https://twitter.com/indirect">@indirect</a> Yeah, non-system binaries should still only be arm64 for the time being</p><span>- Joe Groff (@jckarter)</span></div></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>